package com.explore.demo.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 
 * </p>
 *
 * @author gaolainan
 * @since 2021-04-14
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 用户昵称
     */
    private String nickName;

    /**
     * 用户的头像
     */
    private String headPortrait;

    /**
     * 用户的账号
     */
    private String account;

    /**
     * 用户的密码
     */
    private String password;

    /**
     * 真实姓名
     */
    private String realName;

    /**
     * 性别
     */
    private String gender;

    /**
     * 出生日期
     */
    private LocalDateTime birthDay;

    /**
     * 用户个人手机号
     */
    private String phone;

    /**
     * 用户个人邮箱
     */
    private String mail;

    /**
     * 用户所在省市
     */
    private String province;

    /**
     * 用户所在城市
     */
    private String city;

    /**
     * 大学名称
     */
    private String college;

    /**
     * 入学时间
     */
    private LocalDateTime admissionDate;

    /**
     * 毕业时间
     */
    private LocalDateTime graduateDate;

    private String education;

    /**
     * 用户所修的主专业
     */
    private String majorProfession;


    @Version
    private Integer version;

    @TableLogic
    private Integer deleted;

    @TableField(fill = FieldFill.INSERT)
    @DateTimeFormat(fallbackPatterns = "yyyy-MM-dd")
    @JsonFormat(pattern="yyyy-MM-dd", timezone = "GMT+8")
    private LocalDateTime createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @DateTimeFormat(fallbackPatterns = "yyyy-MM-dd")
    @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
    private LocalDateTime updateTime;


}
